home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / network / file-tra / rdist-6.1 / rdist-6 / rdist-6.1.0-linuxpl2 / src / vsprintf.c < prev   
Encoding:
C/C++ Source or Header  |  1993-01-01  |  314 b   |  21 lines

  1. #include    <stdio.h>
  2. #include    <varargs.h>
  3.  
  4. extern    int    _doprnt();
  5.  
  6. int
  7. vsprintf(buf, fmt, args)
  8.     char    *buf;
  9.     char    *fmt;
  10.     va_list    args;
  11. {
  12.     FILE    strbuf;
  13.  
  14.     strbuf._flag = _IOWRT + _IOSTRG;
  15.     strbuf._ptr = buf;
  16.     strbuf._cnt = 32767;
  17.     _doprnt(fmt, args, &strbuf);
  18.     putc('\0', &strbuf);
  19.     return ferror(&strbuf) ? EOF : 0;
  20. }
  21.